<template>
	<view v-if="isLoaded">
		<li-report @click-row="clickRow" :height="1000" mode="single" :param.sync="param" :reportData="tableData" :columns="cd" :isShowLoadMore="isShowLoadMore" />
	</view>
</template>

<script>
import date from '@/utils/date';
import LiReportMixin from '../../../mixins/liReportMixin.js';
export default {
	mixins: [LiReportMixin],
	data() {
		return {
			navTitle: '历史账单',
			reportFn: 'GetPageReport',
			isShowLoadMore: false,
			Bill: true,
			param: {
				dataTimeRange: date.getToday(),
				pageNum: 1,
				pageSize: 999,
				reportId: 112
			},
			cd: [
				{
					name: 'orderNo',
					label: '订单号',
					fixed: true
				},
				{
					name: 'storeName',
					label: '门店名称',
					fixed: false
				},
				// {
				// 	name: 'sumQuantity',
				// 	label: '数量',
				// 	fixed: false,
				// 	sorter: true
				// },
				{
					name: 'statusName',
					label: '订单状态',
					fixed: false,
					sorter: true
				},
				{
					name: 'sumAmount',
					label: '单据应收金额',
					fixed: false,
					sorter: true
				},
				{
					name: 'sumRealAmount',
					label: '单据实收金额',
					fixed: false,
					sorter: true
				},
				{
					name: 'sumTaskAmount',
					label: '做法金额',
					fixed: false
				},
				{
					name: 'sumFeedAmount',
					label: '加料金额',
					fixed: false
				},
				{
					name: 'sumReduceAmount',
					label: '优惠金额',
					fixed: false,
					sorter: true
				},
				{
					name: 'sumAllAmount',
					label: '小计',
					fixed: false,
					sorter: true
				},
				// {
				// 	name: 'telephone',
				// 	label: '电话号码',
				// 	fixed: false
				// },
				{
					name: 'orderTypeName',
					label: '订单类型',
					fixed: false
				},
				/*     {
          name: "deskId",
          label: "桌号id",
          fixed: false,
        }, */
				// {
				// 	name: 'deskName',
				// 	label: '桌位名称',
				// 	fixed: false
				// },
				{
					name: 'userId',
					label: '会员ID',
					fixed: false
				},
				{
					name: 'userName',
					label: '用户名',
					fixed: false
				},
				/*     {
          name: "payStatus",
          label: "支付状态(0 未付款1 已支付)",
          fixed: false,
        }, */
				/*   {
          name: "status",
          label:
            "订单状态(0 未付款1 已支付2 已配送4 取消订单5 订单退货6 货到付款7 订单超时9 已收货10 已确认收货)",
            fixed: false,
          }, */
				/*         {
          name: "sysUserId",
          label: "操作员Id",
          fixed: false,
        }, */
				{
					name: 'sysUserName',
					label: '操作员名称',
					fixed: false
				},
				/*        {
          name: "isUpload",
          label: "是否上传",
          fixed: false,
        }, */
				// {
				// 	name: 'person',
				// 	label: '就餐人数',
				// 	fixed: false
				// },
				/*       {
          name: "deskCategoryId",
          label: "桌台区域Id",
          fixed: false,
        }, */
				{
					name: 'deskCategoryName',
					label: '桌台区域名称',
					fixed: false
				}
				/*     {
          name: "sourceType",
          label: "0:收银端，1：小程序",
          fixed: false,
        }, */
			]
		};
	},
	methods: {
		clickRow(e) {
			// console.log(e);
			const row = JSON.stringify(e.row);
			uni.navigateTo({
				url: '/pages/reportForms/business/historyBillsDetail?row=' + row
			});
		}
	}
};
</script>
